package com.tom.jmgd.core.enums;


public enum ResultEnum {

    //2XX 为通用成功信息
    SAVE_SUCCESS(200, "保存成功"),
    SYNC_SUCCESS(208, "商品同步成功"),
    DEL_SUCCESS(201, "删除成功"),
    SUCCESS(202, "success"),
    SEND_SUCCESS(203, "发送成功"),
    BIND_SUCCESS(204, "绑定成功"),
    BIND_DEL_SUCCESS(205, "取消绑定成功"),
    QUERY_SUCCESS1(206, "查询成功"),
    BIND_LOGIN_SUCCESS(207, "扫码绑定成功"),
    //3xx为查询相关信息
    QUERY_SUCCESS(300, "查询成功"),
    QUERY_NULL(310, "查无数据"),


    //4xx是安全认证类信息
    AUTHORIZED_FAIL(401, "认证失败"),
    PERMISSION_DENY(403, "没有权限访问"),
    AES_ENCRYPT(405, "AES加密出错"),
    RSA_NOT_PASS(406, "RSA验证不通过"),
    FFB_FIRST_BIND_ERR(407, "丰付宝首次绑定用户返回出错"),

    //5xx为失败及其他错误提示信息
    //500-520:通用问题
    FAIL(500, "fail"),
    FILED_NOT_NULL(501, "参数不能为空"),
    TIME_OUT(502, "超时"),
    WRONG_PARAM(503, "参数错误"),
    VERSION_ERROR(504, "操作失败，此数据已被修改"),//乐观锁
    UNKNOW_ERROR(505, "未知错误"),
    ALREADY_DELETE(506, "该信息已删除"),
    URL_EMPTY(507, "URL为空"),
    UPLOAD_FAIL(508, "上传失败"),
    SYS_ERR(509, "系统错误，请联系客服"),
    SAVE_FAIL(510, "保存失败"),
    SEND_FAIL(511, "发送失败"),
    FFB_RELATIONSID_NULL(512, "查不到登录账户"),
    FFB_INVALID_TOKEN(513, "丰付宝token验证失败"),


    //521-540：用户相关提示
    RELATION_EXIST(520, "此关联已存在"),
    PHONE_RELATED(521, "此手机号码已绑定其他用户"),
    NOT_REGISTER(522, "此账号尚未绑定用户信息"),
    NO_PHONE_NUMBER_OR_FREEZE(523, "找不到手机号码，或该用户已被冻结"),
    USER_ALREADY_EXIST(530, "该用户已存在"),
    FFB_ALREADY_BIND(531, "该丰付宝帐号已经绑定预约平台账号"),
    NO_MEMBER(532, "没有此会员"),


    WEIXIN_BINDING(538, "该账号已绑定微信"),
    WEIXIN_NOT_BINDING(539, "该账号未绑定微信"),
    DEVICEID_NULL(540, "设备Id参数不能为空"),
    WEIXIN_BINDING_EXIST_USER(531, "微信注册的用户已存在，请使用已有账号绑定页进行绑定登陆操作"),
    WEIXIN_BINDING_ERROR(532, "微信绑定失败"),
    QRCODE_LOGIN_ERROR(533, "该二维码已过期失效，请重新生成新的二维码"),
    PHONE_NULL(535, "His系统手机号码为空，请到His系统填写手机号码保存"),
    PATIENT_NULL(536, "His系统没有该病历号"),
    QRCODE_ERROR(534, "非法的二维码"),
    WEIXIN_ALREADY_BIND(537, "该微信号已经被其他账号绑定"),

    //541-560：功能性相关提示
    FAVORITE_EXIST(541, "该收藏已存在"),
    MESSAGE_CODE_ERROR(542, "短信验证码错误"),
    FAVORITE_NOT_EXIST(543, "该收藏不存在"),
    MESSAGE_INVALID(544, "短信验证码过期"),
    PIC_FORMAT_ERROR(550, "请上传PNG、JPG、GIF格式的文件！"),
    PIC_CONTENT_ERROR(551, "此文件不为图片文件"),
    PIC_SIZE_ERROR(552, "请上传512kb以内的文件！"),
    SOCIAL_CACHE_NULL(553, "没法找到缓存的社交账号信息"),
    SOCIAL_CACHE_INVALID(554, "缓存的社交账号信息已过期"),
    ACCOUNT_REGISTERED(555, "帐号已注册"),

    //561-580：预约相关提示
    CAN_NOT_FIND_PATIENTNO(561, "找不到病历号"),
    PATIENTNO_ERROR(562, "病历号不匹配"),
    PHONE_ERROR(563, "医院记录的手机号码不匹配"),
    BLOCK_OUT_NOT_APPT(564, "此时间段已经被预约，请刷新页面"),
    REPEAT_PATEINT(565, "重复绑定就诊人"),
    NEWPATEINT_NEEDCHECK(566, "初诊病人需要到医院报到后才能做第二次预约"),
    DUP_APPT_IS_CONTINUE(567, "当天不能重复预约"),

    //600-620：付款相关提示
    BILL_CHANGE(600, "账单费用已变化，请重新查询"),
    PAYTYPE_NOT_EXIST(601, "请选择一种支付方式"),
    PAY_SUCCESS_REFRESH(602, "已支付成功，请刷新页面；如有疑问请联系客服"),
    BANK_PROCESSING_WAIT(603, "银行处理中，请稍等；如有疑问请联系客服"),


    //张健搞了个重复code，还要我去迁就~~~
    CANNOT_DELETE_ITSELF(633, "不能对自己执行删除或取消操作"),
    USER_FREEZED(634, "该用户已被冻结"),
    PASSWORD_ERR(637, "密码错误"),
    ACCOUNT_FREEZED(635, "该账号已被冻结"),
    ACCOUNT_NULL(636, "账号不存在"),


    UPI_QUERYNULL(801, "查无此交易");
    //700：微信相关
    //WEIXIN_BINDING_EXIST_USER(701, "微信注册的用户已存在，请使用已有账号绑定页进行绑定登陆操作"),
    //WEIXIN_BINDING_ERROR(702, "微信绑定失败"),
    //QRCODE_LOGIN_ERROR(703, "该二维码已过期失效，请重新生成新的二维码"),
    //QRCODE_ERROR(704, "非法的二维码"),
    //WEIXIN_ALREADY_BIND(705, "该微信号已经被其他账号绑定");


    private String msg;

    private int code;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }

    public int getCode() {
        return code;
    }
}

